package com.ruoyi.name_category.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.name_category.mapper.NameCategoryMapper;
import com.ruoyi.name_category.domain.NameCategory;
import com.ruoyi.name_category.service.INameCategoryService;
import javax.annotation.Resource;

/**
 * 标题名称分类Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-12
 */
@Service
public class NameCategoryServiceImpl implements INameCategoryService
{
    @Resource
    private NameCategoryMapper nameCategoryMapper;

    /**
     * 查询标题名称分类
     *
     * @param id 标题名称分类主键
     * @return 标题名称分类
     */
    @Override
    public NameCategory selectNameCategoryById(Long id)
    {
        return nameCategoryMapper.selectNameCategoryById(id);
    }

    /**
     * 查询标题名称分类列表
     *
     * @param nameCategory 标题名称分类
     * @return 标题名称分类
     */
    @Override
    public List<NameCategory> selectNameCategoryList(NameCategory nameCategory)
    {
        return nameCategoryMapper.selectNameCategoryList(nameCategory);
    }

    /**
     * 新增标题名称分类
     *
     * @param nameCategory 标题名称分类
     * @return 结果
     */
    @Override
    public int insertNameCategory(NameCategory nameCategory)
    {
        return nameCategoryMapper.insertNameCategory(nameCategory);
    }

    /**
     * 修改标题名称分类
     *
     * @param nameCategory 标题名称分类
     * @return 结果
     */
    @Override
    public int updateNameCategory(NameCategory nameCategory)
    {
        return nameCategoryMapper.updateNameCategory(nameCategory);
    }

    /**
     * 批量删除标题名称分类
     *
     * @param ids 需要删除的标题名称分类主键
     * @return 结果
     */
    @Override
    public int deleteNameCategoryByIds(Long[] ids)
    {
        return nameCategoryMapper.deleteNameCategoryByIds(ids);
    }

    /**
     * 删除标题名称分类信息
     *
     * @param id 标题名称分类主键
     * @return 结果
     */
    @Override
    public int deleteNameCategoryById(Long id)
    {
        return nameCategoryMapper.deleteNameCategoryById(id);
    }
}
